package Com.amit.synchronization;

public class Lab6  extends Thread{
	
	@Override
	public void run() {
		for(int i=1;i<=4;i++)
		{
			if(Thread.interrupted())
			{
				System.out.println("code for interrupted thread ");
			}
			else
			{
				System.out.println("code for normal thread");
			}
		}
		
	}

	public static void main(String[] args) {
		
		Lab6 t1=new Lab6();
		Lab6 t2=new Lab6();
		
		t1.start();
		
		t1.interrupt();
		
		t2.start();
		
		

	}

}
